package com.kezesong.leasing.common.enums;

import java.util.HashMap;
import java.util.Map;

public enum ReturnCodeEnum {
    SUCCESS("000000", "成功"),
    FAILED("100002", "系统错误"),
    PARAM_EMPTY("100003", "参数为空"),
    SESSION_TIME_OUT("100004", "登陆会话超时"),
    DESCRIPT_WEIXIN_PHONE_ERROR("100005", "解密微信手机号错误"),
    NO_DATA("100001", "数据不存在");


    private String code;
    private String desc;
    private static Map<String, String>  returnCodeMap;

    static {
        returnCodeMap = new HashMap<>();
        for (ReturnCodeEnum returnCodeEnum : ReturnCodeEnum.values()){
            returnCodeMap.put(returnCodeEnum.getCode(), returnCodeEnum.getDesc());
        }
    }

    ReturnCodeEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
